﻿@using System.Data;
@using System.Web;
@using DTcms.Web.MVC.UI.Controllers;
@using DTcms.Model;
@{
   Layout = "~/Areas/Web/Views/" + ViewBag.TemplateSkin + "/web/Shared/_Layout.cshtml";
   DTcms.Model.channel_site site = ViewData["site"] as DTcms.Model.channel_site;
   DTcms.Model.siteconfig config = ViewData["config"] as DTcms.Model.siteconfig;
   BaseController bc = ViewBag.BasePage as BaseController;
   ViewBag.Title = "资源下载 - " + site.name;
   DataTable list = null;
   int count = 0;
   string channel = "down";
}
<div class="section clearfix">
  <div class="line15"></div>
  <div class="wrapper clearfix">
    <div class="photo-list ilist">
      <ul>
        @{ 
        list = bc.get_article_list(channel, 0, 6, "status=0 and is_red=1");
        foreach(DataRow dr in list.Rows){
        <li class="col-@count">
          <a title="@dr["title"]" href="@bc.linkurl("down_show",dr["id"])">
            <span class="abs-bg"></span>
            <span class="txt1">@dr["title"]</span>
            <span class="txt2">
              <p>@dr["add_time"]</p>
            </span>
            <img src="@dr["img_url"]" />
          </a>
        </li>
        }}
      </ul>
    </div>
  </div>
</div>

<!--分类资源-->
@{ 
list = bc.get_category_child_list(channel,0);
foreach (DataRow dr in list.Rows) {
<div class="section clearfix">
  <div class="ntitle">
    <h2>
      <a href="@bc.linkurl("down_list", dr["id"])">@dr["title"]<em></em></a>
    </h2>
    <p>
      <!--小类-->
      @{ 
   DataTable bcategoryList = bc.get_category_child_list(channel, Convert.ToInt32(dr["id"]));
   count = 0;
   foreach (DataRow cdr2 in bcategoryList.Rows) {
      if (count == 1) {
         <a class="no-bg" href="@bc.linkurl("down_list", dr["id"])">@dr["title"]</a>
      }
      else {
         <a href="@bc.linkurl("down_list", dr["id"])">@dr["title"]</a>
      }
   }}
      <!--/小类-->
    </p>
  </div>
  <div class="wrapper clearfix">
    <ul class="img-list high ilist">
      @{ 
   DataTable dt = bc.get_article_list(channel, Convert.ToInt32(dr["id"]), 5, "status=0");
   foreach (DataRow dr1 in dt.Rows) {
      <li>
        <a title="@dr1["title"]" href="@bc.linkurl("down_show", dr1["id"])">
          <div class="img-box">
            <img src="@dr1["img_url"]" />
          </div>
          <div class="info">
            <h3>@dr1["title"]</h3>
            <span>
              <i>浏览：@dr1["click"]次</i>
              <p>@DateTime.Parse(dr1["add_time"].ToString()).ToString("yyyy-MM-dd")</p>
            </span>
          </div>
        </a>
      </li>
   }
   }
    </ul>
  </div>
</div>
}
}
<!--/分类资源-->